Dan Nicholson [Wed, 19 Jun 2019 21:31:18 +0000 (16:31 -0500)]
tests/gpg-verify-data: Split out signature data
The full block with all 5 signatures remains, but this allows passing
individual signatures through the GPG verification APIs. The split was
done with `gpgsplit`, and looking at the output of `gpg --list-packets`
of the split and unsplit files appears correct.
Dan Nicholson [Fri, 21 Jun 2019 11:27:33 +0000 (06:27 -0500)]
tests/gpghome: Create revocation certificates for keys
These can then be imported during a test to revoke a key without trying
to go through the gpg --generate-revocation dialog. Note that these need
to go in a subdirectory of the homedir since `gpgkeypath` will try to
import every regular file in the homedir.
Dan Nicholson [Wed, 19 Jun 2019 16:51:47 +0000 (11:51 -0500)]
tests/libtest: Make temporary gpghome private
gpg prints a warning about unsafe permissions if the homedir is group or
world readable. This is just noise in the test logs, so appease it by
making the homedir 700.
Dan Nicholson [Wed, 19 Jun 2019 14:49:32 +0000 (09:49 -0500)]
tests/libtest: Record long GPG key IDs and fingerprints
Use long GPG key IDs as it's safer and matches the format used by gpg
and gpgme. Add the associated fingerprints since these are needed by gpg
when manipulating keys.
Dan Nicholson [Wed, 19 Jun 2019 18:08:40 +0000 (13:08 -0500)]
lib/gpg: Prefer declare-and-initialize style
As noted in
https://github.com/ostreedev/ostree/pull/1872#discussion_r295408768.
OpenShift Merge Robot [Wed, 22 Jan 2020 14:01:25 +0000 (15:01 +0100)]
Merge pull request #1993 from dbnicholson/f29-rpmostree-fixes
ci/rpmostree: Bump to 2019.4
Dan Nicholson [Tue, 21 Jan 2020 21:56:31 +0000 (14:56 -0700)]
ci/rpmostree: Bump to 2019.4
The vmcheck tests in 2019.3 fail because of an SSH control socket issue
on overlayfs. This is fixed in 2019.4[1]. That has some other changes
such as using Python 3 in tests. The package dependencies have been
synced from the rpm-ostree CI for that.
Unfortunately, this is no longer a totally representative test of f29
since it has 2019.3 in updates. But that's the price you pay for
exercising someone else's CI from your own CI.
1. https://github.com/coreos/rpm-ostree/commit/
c89f81c1385ef095616b0e7001926572a20057b2
Fixes: #1994
OpenShift Merge Robot [Tue, 21 Jan 2020 20:13:02 +0000 (21:13 +0100)]
Merge pull request #1991 from dbnicholson/test-fixes
tests/core: Really pick C.UTF-8 locale
Dan Nicholson [Tue, 21 Jan 2020 17:25:17 +0000 (10:25 -0700)]
tests/core: Really pick C.UTF-8 locale
The case-ignoring regex `^(C|en_US)` will match any locale that starts
with `c`. On my system this is `ca_AD.utf8`, which breaks the test
suite. Instead, use a single regex that includes the joining `.` rather
than 2 separate regexes. This also changes `head` to use the `-n`
option, which has been preferred for at least 10 years in the coreutils
version and is supported by busybox as well.
OpenShift Merge Robot [Thu, 16 Jan 2020 15:47:41 +0000 (16:47 +0100)]
Merge pull request #1987 from akiernan/us-switchroot-tests
Skip /var test if running with systemd and libmount
OpenShift Merge Robot [Tue, 14 Jan 2020 19:30:33 +0000 (20:30 +0100)]
Merge pull request #1988 from akiernan/us-switchroot-installed
test-switchroot.sh: Find ostree-prepare-root in installed tests
Alex Kiernan [Mon, 30 Dec 2019 13:28:35 +0000 (13:28 +0000)]
fixup! test-switchroot.sh: Find ostree-prepare-root in installed tests
Alex Kiernan [Sun, 29 Dec 2019 12:43:34 +0000 (12:43 +0000)]
test-switchroot.sh: Find ostree-prepare-root in installed tests
When running with installed tests, ostree-prepare-root (probably)
exists in /usr/lib. Add heuristics to look for it based on the directory
we're running from.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Alex Kiernan [Sun, 29 Dec 2019 13:25:24 +0000 (13:25 +0000)]
tests: Skip /var test if running with systemd and libmount
If running with systemd and libmount then /var mounting is deferred for
systemd. Skip the relevant tests in this case as it will always fail.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Alex Kiernan [Sun, 29 Dec 2019 13:23:23 +0000 (13:23 +0000)]
build: Expose systemd in OSTREE_FEATURES
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Alex Kiernan [Sun, 29 Dec 2019 12:32:28 +0000 (12:32 +0000)]
test-switchroot.sh: Exclude /proc from file list
Since we're not interested in any file inside /proc, exclude it from the
file listing in our fake root thus avoiding failures when processes die
during our execution and find(1) can't then look inside those
directories.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
OpenShift Merge Robot [Wed, 11 Dec 2019 20:34:36 +0000 (21:34 +0100)]
Merge pull request #1767 from cgwalters/sysroot-mnt-namespace
Support mounting /sysroot (and /boot) read-only
Colin Walters [Wed, 3 Oct 2018 14:57:19 +0000 (14:57 +0000)]
Support mounting /sysroot (and /boot) read-only
We want to support extending the read-only state to cover `/sysroot`
and `/boot`, since conceptually all of the data there should only
be written via libostree. Or at least for `/boot` should *mostly*
just be written by ostree.
This change needs to be opt-in though to avoid breaking anyone.
Add a `sysroot/readonly` key to the repository config which instructs
`ostree-remount.service` to ensure `/sysroot` is read-only. This
requires a bit of a dance because `/sysroot` is actually the same
filesystem as `/`; so we make `/etc` a writable bind mount in this case.
We also need to handle `/var` in the "OSTree default" case of a bind
mount; the systemd generator now looks at the writability state of
`/sysroot` and uses that to determine whether it should have the
`var.mount` unit happen before or after `ostree-remount.service.`
Also add an API to instruct the libostree shared library
that the caller has created a new mount namespace. This way
we can freely remount read-write.
This approach extends upon in a much better way previous work
we did to support remounting `/boot` read-write.
Closes: https://github.com/ostreedev/ostree/issues/1265
Colin Walters [Thu, 5 Sep 2019 00:52:15 +0000 (00:52 +0000)]
finalize-staged: Use the core option parsing to load sysroot
Prep for using the default mount namespace handling there that
will land as part of the read-only `/sysroot` and `/boot` work.
See https://github.com/ostreedev/ostree/issues/1265
OpenShift Merge Robot [Mon, 9 Dec 2019 19:26:55 +0000 (14:26 -0500)]
Merge pull request #1981 from cgwalters/release-2019.6
Release 2019.6
Colin Walters [Mon, 9 Dec 2019 16:18:28 +0000 (16:18 +0000)]
Post-release version bump
Colin Walters [Mon, 9 Dec 2019 16:10:50 +0000 (16:10 +0000)]
Release 2019.6
Nothing really big here, but let's get a release out
so some bigger things like ro-sysroot, signing, sizes can
bake in master for a bit.
OpenShift Merge Robot [Tue, 3 Dec 2019 14:41:08 +0000 (06:41 -0800)]
Merge pull request #1221 from cgwalters/pull-basic-auth
pull: Add support for basic auth
Colin Walters [Wed, 27 Sep 2017 02:02:25 +0000 (22:02 -0400)]
pull: Add support for basic auth
This has been requested a few times for people delivering
OSTree content and wanting to do access control.
OpenShift Merge Robot [Mon, 2 Dec 2019 13:10:18 +0000 (14:10 +0100)]
Merge pull request #1980 from ssssam/sam/readme-buildstream-tweak
README.md: Tweak text about BuildStream
Sam Thursfield [Sun, 1 Dec 2019 19:43:14 +0000 (20:43 +0100)]
README.md: Tweak text about BuildStream
BuildStream no longer uses libostree internally (see
https://gitlab.com/BuildStream/buildstream/issues/387). It still
has first class support for interoperating with libostree repos.
OpenShift Merge Robot [Tue, 26 Nov 2019 12:52:25 +0000 (13:52 +0100)]
Merge pull request #1978 from agners/fix-build-race
Avoid race condition when building outside of source tree
Stefan Agner [Tue, 26 Nov 2019 08:20:30 +0000 (09:20 +0100)]
Avoid race condition when building outside of source tree
When building outside of source tree it can happen that src/ostree/
does not exist (yet) when bison is called. This leads to an build
error like so:
bison: src/ostree/parse-datetime.c: cannot open: No such file or directory
Make sure that src/ostree/ exists when parse-datetime.c is built.
OpenShift Merge Robot [Mon, 25 Nov 2019 14:26:31 +0000 (15:26 +0100)]
Merge pull request #1976 from cgwalters/repo-finder-test
tests/repo-finder: Run realpath() on /tmp
Colin Walters [Thu, 21 Nov 2019 18:37:48 +0000 (18:37 +0000)]
tests/repo-finder: Run realpath() on /tmp
This fixes running this test case inside
https://github.com/cgwalters/coretoolbox
OpenShift Merge Robot [Thu, 21 Nov 2019 14:14:04 +0000 (15:14 +0100)]
Merge pull request #1968 from ptomato/ostree-async-progress-copy-state
libostree: Add ostree_async_progress_copy_state()
Philip Chimento [Mon, 4 Nov 2019 21:21:36 +0000 (13:21 -0800)]
libostree: Add ostree_async_progress_copy_state()
This allows copying the state from one OstreeAsyncProgress object to
another, atomically, without invoking the callback. This is needed in
libflatpak, in order to chain OstreeAsyncProgress objects so that you
can still receive progress updates when iterating a different
GMainContext than the one that the OstreeAsyncProgress object was
created under.
See https://github.com/flatpak/flatpak/pull/3211 for the application of
this API.
Philip Chimento [Tue, 5 Nov 2019 18:05:45 +0000 (10:05 -0800)]
Bump version in symbols file
There were no new symbols in 2019.5 and this version didn't get bumped
when 2019.5 was released.
OpenShift Merge Robot [Fri, 8 Nov 2019 22:54:12 +0000 (23:54 +0100)]
Merge pull request #1909 from rfairley/rfairley-kargs-order-entries
lib/kernel-args: Store kernel args as key/value entries
OpenShift Merge Robot [Fri, 8 Nov 2019 16:08:15 +0000 (17:08 +0100)]
Merge pull request #1971 from akiernan/us-tests-dir
build: create tests directory for split builds
OpenShift Merge Robot [Fri, 8 Nov 2019 15:26:47 +0000 (16:26 +0100)]
Merge pull request #1972 from cgwalters/bump-libglnx-
20191108
Bump libglnx
Colin Walters [Fri, 8 Nov 2019 13:36:23 +0000 (13:36 +0000)]
Bump libglnx
This has a few fixes, mainly I want to get this in
as prep for fs-verity.
Update submodule: libglnx
```
Alex Kiernan (1):
macros: Add TEMP_FAILURE_RETRY for musl
Alexander Larsson (1):
Add glnx_open_anonymous_tmpfile_full() allowing you to specify the directory
Colin Walters (8):
Merge branch 'shutil-rm-rf-errprefix' into 'master'
Merge branch 'us-temp-failure-retry' into 'master'
Merge branch 'anonymous-tmpfile-dir' into 'master'
Merge branch 'meson-older-compilers' into 'master'
fdio: Add glnx_tmpfile_reopen_rdonly()
Merge branch 'reopen-rdonly' into 'master'
build-sys: Add libglnx-testlib.c to Automake
Merge branch 'testlib-automake' into 'master'
Jonathan Lebon (1):
Merge branch 'uchar' into 'master'
Simon McVittie (5):
missing: Remove unused <uchar.h>
Run the fdio test in its own temporary directory
meson: Define HAVE_DECL_FOO to 0 if foo isn't declared
Make the Meson build work on older compilers
CI: Target a Fedora stable release
Will Thompson (3):
Add meson.build files
Document using this as a Meson subproject
Add GitLab CI
```
Alex Kiernan [Tue, 5 Nov 2019 22:26:23 +0000 (22:26 +0000)]
build: create tests directory for split builds
When `--disable-dependency-tracking` is in effect with separate build
directory, the tests directory isn't created as a result of the
dependency generation, which leads to a build race for the tests
directory being created and failures:
Making all in .
make[2]: Entering directory 'TOPDIR/build/tmp/work/riscv64-yoe-linux-musl/ostree/2019.5-r0/build'
(echo '[Test]' > tests/test-local-pull-depth.sh.test.tmp; \
echo 'Type=session' >> tests/test-local-pull-depth.sh.test.tmp; \
echo 'Exec=env G_TEST_SRCDIR=/usr/libexec/installed-tests/libostree G_TEST_BUILDDIR=/usr/libexec/installed-tests/libostree /usr/libexec/installed-tests/libostree/test-local-pull-depth.sh' >> tests/test-local-pull-depth.sh.test.tmp; \
mv tests/test-local-pull-depth.sh.test.tmp tests/test-local-pull-depth.sh.test)
/bin/sh: tests/test-local-pull-depth.sh.test.tmp: No such file or directory
/bin/sh: line 1: tests/test-local-pull-depth.sh.test.tmp: No such file or directory
/bin/sh: line 2: tests/test-local-pull-depth.sh.test.tmp: No such file or directory
mv: cannot stat 'tests/test-local-pull-depth.sh.test.tmp': No such file or directory
make[2]: *** [Makefile:9282: tests/test-local-pull-depth.sh.test] Error 1
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Robert Fairley [Thu, 29 Aug 2019 16:14:26 +0000 (12:14 -0400)]
lib/kernel-args: Store kernel args as key/value entries
Define an `OstreeKernelArgsEntry` structure, which holds
both the key and the value. The kargs order array stores
entries for each key/value pair, instead of just the keys.
The hash table is used to locate entries, by storing
entries in a pointer array for each key. The same public
interface is preserved, while maintaining ordering
information of each key/value pair when
appending/replacing/deleting kargs.
Fixes: #1859
OpenShift Merge Robot [Thu, 7 Nov 2019 21:47:40 +0000 (22:47 +0100)]
Merge pull request #1970 from cgwalters/keyfile-group-not-found
lib/keyfile: Treat "group not found" the same as "key not found"
Colin Walters [Thu, 7 Nov 2019 16:06:39 +0000 (16:06 +0000)]
lib/keyfile: Treat "group not found" the same as "key not found"
Prep for fsverity, where I want to create a new group
`[fsverity]` in the keyfile that has default values. We should
treat the absence of a group the same as absence of a key
in these "with defaults" APIs.
OpenShift Merge Robot [Wed, 6 Nov 2019 15:39:59 +0000 (16:39 +0100)]
Merge pull request #1969 from ricardosalveti/master
Makefile: declare ostree_boot_SCRIPTS and append values
Ricardo Salveti [Wed, 6 Nov 2019 00:16:07 +0000 (21:16 -0300)]
Makefile: declare ostree_boot_SCRIPTS and append values
ostree_boot_SCRIPTS was being set on both Makefile-boot.am and
Makefile-switchroot.am, causing the first one to be replaced by the
other at the final Makefile, so declare as empty and append on both
places instead.
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
OpenShift Merge Robot [Sat, 2 Nov 2019 16:03:37 +0000 (17:03 +0100)]
Merge pull request #1966 from akiernan/us-musl-tests
Fix tests with musl
OpenShift Merge Robot [Fri, 1 Nov 2019 18:42:19 +0000 (19:42 +0100)]
Merge pull request #1965 from akiernan/us-lc-all-en-us
tests/core: Fallback to en_US.UTF-8 locale
Alex Kiernan [Thu, 31 Oct 2019 17:09:36 +0000 (17:09 +0000)]
tests: Avoid musl failure with `cp -a`
When copying the tree, using musl and GNU coreutils, something gets confused
when setting the ownership of symlinks and the copy fails with:
cp: failed to preserve ownership for osdata-devel/bin: Not supported
Rework using tar to avoid the problem.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Alex Kiernan [Thu, 31 Oct 2019 11:28:07 +0000 (11:28 +0000)]
tests/core: Assume C.UTF-8 if locale isn't found
When building with musl there's no locale command, also its default
locale is C.UTF-8, so just get C.UTF-8 if we can't find locale.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Alex Kiernan [Thu, 31 Oct 2019 11:30:00 +0000 (11:30 +0000)]
tests: Handle EPIPE failures when head terminates
When using musl, it appears that the default is line buffered output, so
when `head -1` reads from a pipe we have to handle the source end of the
pipe getting EPIPE.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Alex Kiernan [Wed, 30 Oct 2019 07:55:41 +0000 (07:55 +0000)]
tests/core: Fallback to en_US.UTF-8 locale
A number of tests expect explicit left/right single quotes in their
messages, which will never happen in the C locale. Change so we pick a
likely UTF-8 locale, or fail if we can't find one.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
OpenShift Merge Robot [Wed, 30 Oct 2019 17:46:41 +0000 (18:46 +0100)]
Merge pull request #1963 from cgwalters/release
Release 2019.5
Colin Walters [Thu, 24 Oct 2019 15:18:45 +0000 (15:18 +0000)]
Post-release version bump
Colin Walters [Thu, 24 Oct 2019 15:18:23 +0000 (15:18 +0000)]
Release 2019.5
OpenShift Merge Robot [Wed, 30 Oct 2019 13:20:08 +0000 (14:20 +0100)]
Merge pull request #1962 from jlebon/pr/support-hmac
lib/deploy: Also install HMAC file into /boot
Jonathan Lebon [Tue, 29 Oct 2019 20:45:29 +0000 (16:45 -0400)]
lib/deploy: Also install HMAC file into /boot
To allow for FIPS mode, we need to also install the HMAC file from
`/usr/lib/modules` to `/boot` alongside the kernel image where the
`fips` dracut module will find it. For details, see:
https://github.com/coreos/fedora-coreos-tracker/issues/302
Note I didn't include the file in the boot checksum since it's itself a
checksum of the kernel, so we don't really gain much here other than
potentially causing an unnecessary bootcsum bump.
OpenShift Merge Robot [Tue, 29 Oct 2019 05:26:17 +0000 (06:26 +0100)]
Merge pull request #1953 from uajain/uajain/fix-memory-leak
async-progress: Plug memory leak while destroying GSource
OpenShift Merge Robot [Mon, 28 Oct 2019 19:58:37 +0000 (20:58 +0100)]
Merge pull request #1961 from jlebon/pr/refine-gsource
lib/pull: Tweak update_timeout logic again
Jonathan Lebon [Mon, 28 Oct 2019 18:04:55 +0000 (14:04 -0400)]
lib/pull: Tweak update_timeout logic again
I was hitting `SIGSEGV` when running `cosa build` and narrowed it down
to #1954. What's happening here is that because we're using the default
context, when we unref it in the out path, it may not actually destroy
the `GSource` if it (the context) is still ref'ed elsewhere. So then,
we'd still get events from it if subsequent operations iterated the
context.
This patch is mostly a revert of #1954, except that we still keep a ref
on the `GSource`. That way it is always safe to destroy it afterwards.
(And I've also added a comment to explain this better.)
Umang Jain [Fri, 25 Oct 2019 15:28:34 +0000 (20:58 +0530)]
async-progress: Plug memory leak while destroying GSource
See https://gitlab.gnome.org/GNOME/glib/commit/
71973c722
OpenShift Merge Robot [Fri, 25 Oct 2019 14:07:25 +0000 (16:07 +0200)]
Merge pull request #1955 from cgwalters/revert-grub2-exit
Revert grub2 exit, add new grub2: Honor /boot/.grub2-bls-enabled
OpenShift Merge Robot [Fri, 25 Oct 2019 13:50:49 +0000 (15:50 +0200)]
Merge pull request #1956 from akiernan/us-test-export
tests/export: Guard with check for libarchive
Alex Kiernan [Thu, 24 Oct 2019 18:07:30 +0000 (19:07 +0100)]
tests/export: Guard with check for libarchive
If we are built without libarchive support, this test fails:
error: This version of ostree is not compiled with libarchive support
...
ERROR: tests/test-export.sh - too few tests run (expected 5, got 0)
ERROR: tests/test-export.sh - exited with status 1
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Colin Walters [Thu, 24 Oct 2019 15:21:17 +0000 (15:21 +0000)]
Revert "grub2: Exit gracefully if the configuration has BLS enabled"
This reverts commit
985a14100295c99d0c6d712bfbee0ec52a3a1601.
It turned out that some people have old bootloaders, and hence
get the "no entries" problem. That's much, much much worse
than double entries.
OpenShift Merge Robot [Wed, 23 Oct 2019 16:02:30 +0000 (18:02 +0200)]
Merge pull request #1954 from jlebon/pr/update-timeout
lib/pull: Avoid calling destroy on unref'ed GSource
OpenShift Merge Robot [Wed, 23 Oct 2019 15:53:27 +0000 (17:53 +0200)]
Merge pull request #1952 from cgwalters/trivial-rename
build-sys: Rename internal conditionals for trivial-httpd
Jonathan Lebon [Wed, 23 Oct 2019 15:04:00 +0000 (11:04 -0400)]
lib/pull: Avoid calling destroy on unref'ed GSource
We're creating the timer source and then passing ownership to the
context, but because we didn't free the pointer, we would still call
`g_source_destroy` in the exit path. We'd do this right after doing
`unref` on the context too, which would have already destroyed and
unref'ed the source.
Drop that and just restrict the scope of that variable down to make
things more obvious.
Just noticed this after reviewing #1953.
Colin Walters [Mon, 21 Oct 2019 21:45:20 +0000 (21:45 +0000)]
build-sys: Cleanup handling for trivial-httpd-cmdline
This way it's clearer this bit is only about the CLI entrypoint
also living in `ostree trivial-httpd`, not the underlying
`ostree-trivial-httpd` binary that's separate now.
Delete the automake conditional for this, and make the manpage
conditional use `if USE_LIBSOUP` the same way the C build does.
Suggested-by: Jonathan Lebon <jonathan@jlebon.com>
OpenShift Merge Robot [Mon, 21 Oct 2019 21:43:22 +0000 (23:43 +0200)]
Merge pull request #1950 from akiernan/us-revert-trivial-httpd
Revert trivial httpd changes (#1912)
Alex Kiernan [Sat, 19 Oct 2019 21:20:27 +0000 (22:20 +0100)]
Revert "Always enable trivial-httpd for tests"
This reverts commit
82699a67dbb6bfcc9452bb969e7872809232a84f.
Alex Kiernan [Sat, 19 Oct 2019 21:20:25 +0000 (22:20 +0100)]
Revert "Gate ostree-trivial-httpd on BUILDOPT_TRIVIAL_HTTPD"
This reverts commit
83d44ac20ae80d74e05d89744fd1fbd4f45b7fba.
OpenShift Merge Robot [Fri, 18 Oct 2019 18:59:06 +0000 (20:59 +0200)]
Merge pull request #1947 from cgwalters/more-scan-build-2
More scan build 2
OpenShift Merge Robot [Fri, 18 Oct 2019 17:56:14 +0000 (19:56 +0200)]
Merge pull request #1949 from dbnicholson/no-g-gnuc-function
repo: Stop using deprecated G_GNUC_FUNCTION
Dan Nicholson [Fri, 18 Oct 2019 17:10:44 +0000 (11:10 -0600)]
repo: Stop using deprecated G_GNUC_FUNCTION
In glib 2.62 this has been changed to emitting a warning. Use G_STRFUNC
instead, which has been available for a long time and is already used in
other places in ostree.
Colin Walters [Fri, 18 Oct 2019 15:06:51 +0000 (15:06 +0000)]
lib/checksum-utils: Use g_memdup()
This is clearer and silences a scan-build warning.
Colin Walters [Fri, 18 Oct 2019 14:57:47 +0000 (14:57 +0000)]
tests: [scan-build] Initialize a variable
False positive.
Colin Walters [Fri, 18 Oct 2019 14:56:51 +0000 (14:56 +0000)]
lib: Port variant-builder.c to new style
Seeing `scan-build` warning here, prep for fixing it.
Colin Walters [Fri, 18 Oct 2019 14:48:44 +0000 (14:48 +0000)]
tests: Port keyfile test to new style
Just noticed in passing.
Colin Walters [Fri, 18 Oct 2019 14:48:25 +0000 (14:48 +0000)]
lib/pull: [scan-build] Silence a dead store warning
This one was actual duplicate code.
Colin Walters [Fri, 18 Oct 2019 14:45:33 +0000 (14:45 +0000)]
lib/repo: [scan-build] Quiet a dead store warning
False positive, just add a pacifier.
Colin Walters [Wed, 16 Oct 2019 19:36:31 +0000 (19:36 +0000)]
tree-wide: [scan-build] Fix some dead stores
No real issues, just quieting the scanner.
OpenShift Merge Robot [Wed, 16 Oct 2019 21:12:34 +0000 (23:12 +0200)]
Merge pull request #1945 from cgwalters/papr-trim
ci: Trim PAPR config to drop required flag
OpenShift Merge Robot [Wed, 16 Oct 2019 18:44:15 +0000 (20:44 +0200)]
Merge pull request #1943 from cgwalters/more-scan-build
More scan build
Colin Walters [Wed, 16 Oct 2019 18:38:37 +0000 (18:38 +0000)]
ci: Trim PAPR config to drop required flag
Same as https://github.com/coreos/rpm-ostree/pull/1923
Quoting that rationale:
> Since we're not using Homu anymore (and Tide instead looks at
> all statuses by default), let's just drop it. This brings down the
> number of statuses on PRs by one more (and so one less context to
> override when needed).
OpenShift Merge Robot [Wed, 16 Oct 2019 18:15:56 +0000 (20:15 +0200)]
Merge pull request #1912 from akiernan/us-fix-trivial-httpd
Gate ostree-trivial-httpd on BUILDOPT_TRIVIAL_HTTPD
OpenShift Merge Robot [Wed, 16 Oct 2019 15:21:10 +0000 (17:21 +0200)]
Merge pull request #1937 from cgwalters/zipl-backend
bootloader: Add a zipl bootloader backend
OpenShift Merge Robot [Wed, 16 Oct 2019 15:05:31 +0000 (17:05 +0200)]
Merge pull request #1931 from cgwalters/covscan-fixes
libotutil: Port keyfile-utils.c to new style
OpenShift Merge Robot [Wed, 16 Oct 2019 14:24:57 +0000 (16:24 +0200)]
Merge pull request #1942 from cgwalters/build-installdeps
ci: Skip all yum operations if SKIP_INSTALLDEPS is set
Colin Walters [Mon, 14 Oct 2019 19:22:19 +0000 (19:22 +0000)]
bootloader: Add a zipl bootloader backend
zipl is a bit special in that it parses the BLS config files
directly *but* we need to run the command to update the "boot block".
Hence, we're not generating a separate config file like the other
backends. Instead, extend the bootloader interface with a `post_bls_sync`
method that is run in the same place we swap the `boot/loader` symlink.
We write a "stamp file" in `/boot` that says we need to run this command.
The reason we use stamp file is to prevent the case where the system is
interrupted after BLS file is updated, but before zipl is triggered,
then zipl boot records are not updated.
This opens the door to making things eventually-consistent/reconcilable
by later adding a systemd unit to run `zipl` if we're interrupted via
a systemd unit - I think we should eventually take this approach
everywhere rather than requiring `/boot/loader` to be a symlink.
Author: Colin Walters <walters@verbum.org>
Tested-by: Tuan Hoang <tmhoang@linux.ibm.com>
Co-Authored-By: Tuan Hoang <tmhoang@linux.ibm.com>
Colin Walters [Wed, 16 Oct 2019 13:48:20 +0000 (13:48 +0000)]
prune: [scan-build] Initialize a variable
Another false positive because we only read this if `opt_keep_younger_than` is `TRUE`,
but let's initialize variables on general principle.
Colin Walters [Wed, 16 Oct 2019 13:44:46 +0000 (13:44 +0000)]
tree-wide: [scan-build]: Add some asserts that pointers are non-NULL
More "scan-build doesn't understand GError and our out-param conventions"
AKA "these errors would be impossible with Rust's sum type Result<> approach".
Colin Walters [Wed, 16 Oct 2019 13:38:29 +0000 (13:38 +0000)]
commit: [scan-build] Remove a dead assignment
The `write_commit()` API defaults to current time, and
this assignment became dead in:
https://github.com/ostreedev/ostree/commit/
8ba90a33410c9707a30a77f808a7ec712d465165
Colin Walters [Wed, 16 Oct 2019 13:32:36 +0000 (13:32 +0000)]
ci: Skip all yum operations if SKIP_INSTALLDEPS is set
This is used by our OpenShift Prow job; we use the
cosa buildroot container:
https://github.com/coreos/coreos-assembler/pull/730
And using `yum` at all means we can flake on fetching rpm metadata.
Colin Walters [Mon, 14 Oct 2019 13:19:28 +0000 (13:19 +0000)]
libotutil: Port keyfile-utils.c to new style
I was trying to fix a clang `scan-build` error that jlebon
ended up tracking down in
https://github.com/ostreedev/ostree/pull/1939/commits/
9344de1ce1e8c185e01988277606ba1ed7f9d16b
But in the process of tracing through this I found it
way easier to read as "new style" code, so this also ports the
code.
I added a `g_assert()` in there too to help assert that
`g_key_file_get_value` won't leak in the error path.
OpenShift Merge Robot [Tue, 15 Oct 2019 17:56:54 +0000 (19:56 +0200)]
Merge pull request #1932 from cgwalters/covscan-fixes-2
libostree: Add an assert to pacify clang-analyzer
OpenShift Merge Robot [Tue, 15 Oct 2019 17:13:56 +0000 (19:13 +0200)]
Merge pull request #1939 from jlebon/pr/fix-keyfile-leak
src/libotutil: Fix strv memory leak
Jonathan Lebon [Tue, 15 Oct 2019 15:56:34 +0000 (11:56 -0400)]
src/libotutil: Fix strv memory leak
We were only freeing the array and not the members.
Caught by `clang-analyzer` in:
https://github.com/ostreedev/ostree/pull/1931
OpenShift Merge Robot [Tue, 15 Oct 2019 15:59:00 +0000 (17:59 +0200)]
Merge pull request #1933 from cgwalters/scan-build-0
A few more scan-build fixes
Colin Walters [Mon, 14 Oct 2019 14:24:18 +0000 (14:24 +0000)]
repo: [scan-build]: Mark a variable used
We're just using this to auto-free, quiet the static analysis.
Colin Walters [Mon, 14 Oct 2019 14:22:12 +0000 (14:22 +0000)]
sysroot: [scan-build] Remove a dead assignment
Just quieting the scan.
Colin Walters [Mon, 14 Oct 2019 14:20:44 +0000 (14:20 +0000)]
sysroot: [scan-build]: Remove a dead assignment
Clarify the conditionals here and remove a dead assignment.
Colin Walters [Mon, 14 Oct 2019 14:17:09 +0000 (14:17 +0000)]
repo: [scan-build] Initialize a variable
Another GLib error convention issue; but eh, we might as
well be conservative and always initialize variables.